package LeetCode刷题;

/**
 * @program: Java_Study
 * @author: Xiaofan
 * @createTime: 2021-09-16 10:46
 * @description: Functions of this class is 给你一个字符串 s，找到 s 中最长的回文子串。
 **/
public class No最长回文子串 {
    public static void main(String args[]){
        System.out.println(longestPalindrome("babad"));
    }
    public static String longestPalindrome(String s) {
        int i=0;
        int j=s.length()-1;
        while (i!=j){
            if(s.charAt(i)==s.charAt(j)){
                i++;
                j--;
            }

        }
        return "";
    }
}